package main

import (
	"github.com/garyburd/redigo/redis"
	"srv/depth/exchange"
	"os"
	"fmt"
)

// 深度
func DepthFactory(slug string, pool *redis.Pool) exchange.InterfaceDepth {
	switch slug {
	case "binance":
		return exchange.NewBinanceDepth(slug, pool)
	case "huobi":
		return exchange.NewHuobiDepth(slug, pool)
	case "bit-z":
		return exchange.NewBitZDepth(slug, pool)
	}
	fmt.Println("no slug exists")
	os.Exit(1)
	return nil
}
